package over;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Env {
    public Map<String, Object> environment = new HashMap<>();

    public Object lookup(String x) {
        return environment.get(x);
    }

    public void update(String x, Object v) {
        environment.put(x, v);
    }

   public void interpret(List<JStmt> stmts) {
       for (JStmt jStmt : stmts) {
           jStmt.eval(this);
       }
    }

}

